#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;
const int N = 1e6 + 10;
int a[N];
int n;
double price;
int main()
{
    cin >> n >> price;
    for (int i = 0; i < n; i++)
        cin >> a[i];
    double avg = price / n;
    double total = 0;
    sort(a, a + n);
    for (int i = 0; i < n; i++)
    {
        if (a[i] < price / (n - i))
        {
            price -= a[i];
            total += pow((avg - a[i]), 2);
            // cout<<pow((avg-a[i]),2)<<endl;
        }
        else
        {
            total += pow((price / (n - i) - avg), 2) * (n - i);
            break;
        }
    }
    printf("%.4f", sqrt(total / n));
    return 0;
}